<?php
define('DOCUMENT_ROOT', dirname(__FILE__));
include_once(DOCUMENT_ROOT . '/inc/Rest.php');
@session_start();

$start = strpos($_POST['content'], '<input type="hidden" name="object_id" value="');
$end = strpos($_POST['content'], '/>', $start);
$objectId = str_replace('<input type="hidden" name="object_id" value=', '', substr($_POST['content'], $start, ($end - $start)));
$objectId = str_replace('"', '', $objectId);
$_SESSION['user_id'] = $objectId;
echo $objectId;